﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using NL.ADA.ConfigClient;
using NL.ADA.ConfigService;
using System.ServiceModel;
using NL.ADA.ConfigService.DAL.TypedListClasses;
using NL.ADA.ConfigService.DAL.HelperClasses;
using NL.ADA.ConfigService.DAL.EntityClasses;
using NL.ADA.Common;

namespace NL.ADA.ConfigClient.NUnit
{
    public class UnitTestGateway
    {
        public string ApplicationCode { get; set; }
        public string Mode { get; set; }
        public int ModeId { get; set; }
        public int ApplicationId { get; set; }
        private IConfigService _service;
        private ChannelFactory<IConfigService> _channelFactory;

        public UnitTestGateway()
        {
            _channelFactory = new ChannelFactory<IConfigService>("WSHttpBinding_IConfigService"); //("[endpoint]")
            _service = _channelFactory.CreateChannel(); 
        }

        public CustomConfigList GetAllConfigTypedList(int appId,int modeId)
        {
            return _service.GetAllConfigs(appId,modeId);
        }
    }
}
